package com.aaa.demo05;

/**
 * @author ${崔灿}
 * @date 2022/11/01 15:47
 **/

public class TestSleep {
    public static void main(String[] args) {
        SleepDemo sleepDemo = new SleepDemo();
        sleepDemo.start();
    }
}
class SleepDemo extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(Thread.currentThread().getName() + "**"+i);
        }
    }
}